package test;
public class basics
{
	/** test eines einfachen funktion aufrufes **/
	public basics()
	{

	}
	
	public static void main(String [] args)
	{
		// Main mainl = new Main();
		System.out.println("Hello World");
		
		/** es existiert schon eine Java eigene Klasse Namens Point, aber das scheint Java überhaupt nicht zu stören **/
		Point p1 = new Point(-2f, 2f); 
		Point p2 = new Point(5f, 8f);
		
		Line l1 = new Line(p1,p2);

		/** funktioniert auch **/
		Line l2 = new Line ( new Point(1f,1f), new Point(2f,3f) );
		
		Point p3 = new Point(4f, 4f); 
		Point p4 = new Point(9f, 1f); 
		Point p5 = new Point(1f, -1f); 

		/** creates an array that holds lots of objects of type Point **/
		Point[] ARRAY_points = { p1, p2 ,p3, p4, p5 }; 
		
		/** for java valid strings must be inside "double quote" single 'quote is not valid' **/
		// invalid: // String[] strings = { 'p1','some string'}; 
		// valid:
		String[] ARRAY_strings = { "p1","some string" };
		
		Polygon polyX = new Polygon( ARRAY_points );

		/** funktioniert auch **/
		Polygon poly1 = new Polygon( new Point[ ] { p1, p3, p2, p4, p5 } ); 
		Polygon poly2 = new Polygon( new Point[ ] { p1, p2, p4, p5, p3 } ); 
		Polygon poly3 = new Polygon( new Point[ ] { p1, p2, p4, p5 } ); 
		Polygon poly4 = new Polygon( new Point[ ] { p1, p2, p4 } ); 
	}
}